package com.xafc.demo.security.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "jwt")
public class JwtSecurityProperties {

    /**
     * Cookie的名称
     */
    private String cookieName = "JWT_TEST";

    /**
     * 记住我的过期时间
     * 60 * 60 * 30 * 24 = 30天
     */
    private int autoExpires = 60 * 60 * 30 * 24;

    /**
     * 正常过期时间
     * 60 * 60 * 24 = 24小时
     */
    private int normalExpires = 60 * 60 * 12;

    /**
     * 承载前缀
     */
    private String headToken = "Bearer:";


    /**
     * 存放鉴权信息的Header名称，默认是Authorization
     */
    private String httpHeadName = "Authorization";


    /** Base64对该令牌进行编码 */
    private String secret;

}
